#ifndef TREEGEN2D_H
#define TREEGEN2D_H
#include "treegen.h"
#include "common.h"
#include "spacecol2d.h"

class SpaceCol2D;

class TreeGen2D : public TreeGen
{
public:
    TreeGen2D();
    void genTree();
    void stupidGen(Bud *b, int depth);
    void iterateShadowB(Shadow2D *shadowGrid);
    void iterateSpaceColD(SpaceCol2D * spaceCol);
    void updateTree();
    void drawBud(Bud *b);
    TreeGen2D* arrayToTree(vector <float *>);
    TreeGen2D* loadTreeFromFile( QString filename);

private:
    float3 findDirection();
    void chooseBudFate();
    //void calculateBranchDiameter(Bud *b);
protected:
    virtual void initializeBud(Bud *b);
    virtual void calculateBranchDiameter(Bud *b);


};
#endif // TREEGEN2D_H
